package com.own.core.html.panel.password;

import java.lang.reflect.Field;


import org.apache.wicket.model.IModel;

import com.own.core.html.form.OwnForm;
import com.own.core.html.form.password.OwnPassword;
import com.own.core.html.form.password.Password;
import com.own.core.html.panel.OwnDynPanel;
import com.own.core.model.OwnCompoundPropertyModel;

public class OwnPasswordFieldPan extends OwnDynPanel {
	Password password;
	OwnForm form;

	public OwnPasswordFieldPan(IModel model, Field field, Password password,
			OwnForm form) {
		super(model, field);
		this.password = password;
		OwnPassword ownPassword = new OwnPassword("password",
				((OwnCompoundPropertyModel) model).bind(field.getName()), password);

		setFormComponent(ownPassword);
		ownPassword.setResetPassword(false);
		draw();
//		OwnPassword ownPassword2 = new OwnPassword("password2",
//				((OwnCompoundPropertyModel) model).bind(field.getName()), password);
//
//		ownPassword2.add(new AttributeModifier("class", true, new Model(
//				"required")));
//		add(ownPassword2);
//		form.add(new EqualPasswordInputValidator(ownPassword, ownPassword2));
	}

}
